
const cityOrder = [
    '南宁市',
    '柳州市',
    '桂林市',
    '梧州市',
    '北海市',
    '防城港市',
    '钦州市',
    '贵港市',
    '玉林市',
    '百色市',
    '贺州市',
    '河池市',
    '来宾市',
    '崇左市'
]

/**
 * [
 *  {
 *    name: '南宁市',
 *  }
 * ]
 * @param {array} data
 * @return {object}
 */
export function orderDataByCity(data) {
    const result = cityOrder.map(cityName => {
        return data.find(item => item.name === cityName)
    }).filter(x=>x != null)
    return result.length > 0 ? result : data
}





